/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.techhighteam675.robot2012;

import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

/**
 *
 * @author Noah Dove
 */
public class Position 
{   
    public double x, z, error;
    
    public Position()
    {
       this(0,0);
    }
    
    public Position(double _x, double _z) 
    {
        x = _x; 
        z = _z; 
        error = 0; 
    }

    void Print() 
    {
		System.out.println(x + ", " + z);
//		SmartDashboard.putDouble("Robot pos x:", x);
//		SmartDashboard.putDouble("Robot Pos z:", z);
	}
	void SetError(Position Avg)
	{
		double dx = (x - Avg.x);
		double dz = (z - Avg.z);
		error = Math.sqrt((dx*dx) + (dz * dz));
	}
}
